=========================================================================== BBS: The Abacus * HST/DS * Potterville, MI Date: 03-12-93 (16:55) Number: 139 From: BOB PERKINS Refer#: 135 To: CASEY PEARSON Recvd: NO Subj: Re: Layout problem (HELP! Conf: (35) Quick Basi --------------------------------------------------------------------------- CP> I need help with random access files. (RAF) Here is the layout: Try this and see if it works: TYPE struct StreetNumb as string * 6 StreetName as string * 12 StreetDir as string * 2 StreetType as string * 6 City as string * 15 State as string * 2 Zip as string * 5 YTDHours as integer HourlyRate as single YTDGross as double SocSecNum as string * 9 END TYPE DIM struct AS struct OPEN INFILE$ FOR BINARY AS #1 'in binary mode the second argument to GET is the byte position to 'begin reading/writing. If omitted, GET grabs the current record in the 'file. In your case, the record length is 71 bytes. To get to the 'second record you'd use 'GET 1, 72, struct', etc... You could also use 'the SEEK command to skip to the record you wish. To write to the 'file, use 'PUT 1, bytepos%, struct'. Again, if you omit the bytepos% 'argument then the write will take place at the current position in the 'file. After a GET or PUT the file pointer is set to the next record 'after the read/write. GET 1, , struct PRINT struct.StreetNumb PRINT struct.StreetName 'etc... CLOSE #1: END --- Msg V4.5 * Origin: Reciprocity Failure (1:124/4115.236) SEEN-BY: 1/211 11/2 4 13/13 101/1 108/89 109/25 110/69 114/5 123/19 124/1 SEEN-BY: 153/752 154/40 77 157/2 159/100 125 430 950 203/23 209/209 280/1 SEEN-BY: 390/1 396/1 15 397/2 2230/100 3603/20